#Region "Imports Directives"

Imports System
Imports System.Collections.Generic
Imports System.Text

#End Region

Namespace C4F.DevKit.Bluetooth

    Namespace FileTransferProfile

        ''' <summary>
        ''' Class representing an asynchronous FileTransferProfile Request.
        ''' </summary>
        Friend Class FTPRequest

#Region "Private Members"

            ''' <summary>
            ''' The user-supplied state object supplied when the asynchronous 
            ''' operation was requested.
            ''' </summary>            
            Private m_userstate As Object

            ''' <summary>
            ''' Type of the asynchronous FileTransferProfile operation.
            ''' </summary>
            Private m_requestType As FTPRequestType
            ''' <summary>
            ''' The input parameters required for the asynchronous operation.
            ''' </summary>
            Private m_requestParameters() As Object

#End Region

#Region "Public Properties"

            ''' <summary>
            ''' Gets the type of the asynchronous FileTransferProfile operation.
            ''' </summary>
            Public ReadOnly Property RequestType() As FTPRequestType

                Get
                    Return Me.m_requestType
                End Get

            End Property

            ''' <summary>
            ''' Gets the user-supplied state object supplied when the asynchronous
            ''' operation was requested.
            ''' </summary>
            Public ReadOnly Property UserState() As Object

                Get
                    Return Me.m_userstate
                End Get

            End Property

            ''' <summary>
            ''' Gets the input parameters required for the asynchronous operation.
            ''' </summary>
            Public ReadOnly Property RequestParameters() As Object()

                Get
                    Return Me.m_requestParameters
                End Get

            End Property

#End Region

#Region "Constructor"

            ''' <summary>
            ''' Initializes the FTPRequest object.
            ''' </summary>
            ''' <param name="requestType">The type of asynchronous operation.
            ''' </param>
            ''' <param name="userState">The user-supplied state object supplied 
            ''' when the asynchronous operation was requested.</param>
            ''' <param name="requestParameters">The input parameters required for
            ''' the asynchronous operation.</param>
            ''' <exception cref="ArgumentException">Thrown when 
            ''' when one of the arguments provided to the method is not valid.
            ''' </exception>
            Public Sub New(ByVal requestType As FTPRequestType, ByVal userState As Object, ByVal ParamArray requestParameters As Object())

                If Not [Enum].IsDefined(GetType(FTPRequestType), requestType) Then
                    Throw New ArgumentException(FTPMessages.ErrorMsgInvalidRequestType, FTPMessages.RequestType)
                End If

                Me.m_requestType = requestType
                Me.m_userstate = userState
                Me.m_requestParameters = requestParameters

            End Sub

#End Region

        End Class

    End Namespace

End Namespace
